function adapter(){
    document.documentElement.style.fontSize = document.documentElement.clientWidth / 10 + 'px';
}
adapter();
window.onresize = adapter;